package com.asura.report;

import java.util.EnumMap;
import java.util.Map;

import com.asura.student.Student;
import com.asura.student.Student.Grade;

public class ReportCart {

	public static final String A_MESSAGE = "Excellent!";
	public static final String B_MESSAGE = "Very Good!";
	public static final String C_MESSAGE = "Hmmm...!";
	public static final String D_MESSAGE = "You are not trying!";
	public static final String F_MESSAGE = "Loser!";
	private Map<Grade,String> messages = null;
	
	public String getMessage(Grade grade) {
		if(messages == null){
			messages = new EnumMap<Grade,String>(Student.Grade.class);
			messages.put(Grade.A, A_MESSAGE);
			messages.put(Grade.B, B_MESSAGE);
			messages.put(Grade.C, C_MESSAGE);
			messages.put(Grade.D, D_MESSAGE);
			messages.put(Grade.F, F_MESSAGE);
		}
		return messages.get(grade);
	}

}
